﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Jayden.Dll.CodeGen;

namespace Jayden.Windows.CodeGen
{
	public partial class WizardForm : Form
	{
		public WizardForm()
		{
			InitializeComponent();

			
		}

		private void bNext_Click(object sender, EventArgs e)
		{
			List<Member> members = membersEditor.BuildMembers();
			membersEditor.BuildFromMembers(members);

			CodeBuilder builder = new CodeBuilder();
			foreach (Member member in members)
				member.GenerateMember(builder);
			builder.AppendLine();
			foreach (Member member in members)
				member.GeneratePublicPropertyFromMember(builder);

			Clipboard.SetText(builder.ToString());

			MessageBox.Show(this, "Copied to clipboard", "Copy");
		}
	}
}
